Skip to main content

Khronos Blog

New Release of Vulkan SDK

New Release of Vulkan SDK
Streamlines Vulkan Application Development for Apple Platforms

The Khronos® Vulkan® Portability™ Initiative fights 3D graphics platform fragmentation by encouraging and enabling layered implementations of subsets of Vulkan over Metal, DX12, and other APIs. Much of the early interest in Vulkan Portability has been around the ability to layer Vulkan functionality over Apple’s Metal API, as native Vulkan drivers are not permitted on macOS, iOS and other Apple platforms.

In September 2020, Khronos released the provisional version of the Vulkan Portability extension that defines standardized, cross-vendor queries for the Vulkan functionality provided by layered implementations. There are multiple royalty-free, open-source Vulkan Portability implementations over Metal, including MoltenVK and gfx-portability. MoltenVK 1.1 has recently added significant new functionality including Vulkan 1.1 features, 48 Vulkan extensions, and support for Metal 3.0, Apple Silicon, Mac Catalyst and tvOS.

Vulkan Portability implementations are enabling flexible API choices for developers. For example, demanding real-time games and applications such as those using the live performance NAP Framework from Naivi, are using Vulkan on macOS using MoltenVK. The open source community is extending the effectiveness of Vulkan Portability by implementing multi-layer stacks such as the Zink OpenGL layer over Vulkan ported to macOS using MoltenVK on top of Metal to provide a high-performance OpenGL on Mac for professional authoring applications.

“I was initially skeptical about the use of a Vulkan translation layer to Metal, but it turns out MoltenVK enables applications using the realtime NAP Framework to run as well on macOS as they do on Linux and Windows. This is something I'd like to highlight and stress the importance of - without the portability of Vulkan we would have been forced to implement a special Metal rendering backend just for macOS users, something not doable for a relatively small company such as ours. Plus switching to Vulkan dramatically improved render-times for Mac users.”

As more developers use Vulkan Portability on Apple platforms the need to further improve associated development tools grows more urgent. LunarG, who develops and supports Vulkan open source tooling, has previously ported the Vulkan SDK to macOS, enabling developers to build, run, and debug their Vulkan applications on Macs.

Today, the functionality of the Vulkan SDK gets a major upgrade for Vulkan developers targeting Apple platforms.

LunarG is now shipping Device Simulation (DevSim) and Validation layers for the Vulkan SDK on macOS in addition to Linux and Windows. DevSim layers enable Vulkan application development on a highly-capable development system by "simulating" a less-capable target Vulkan implementation through constraining the reported features and resources on the more-capable platform. Validation layers verify that applications are correctly using the reported Vulkan functionality. The validation layers and associated Vulkan loader on macOS also now support Apple Silicon via Universal Binaries.

In addition, the Hardware Capability Viewer utility that is used to generate entries in the gpuinfo.org public database, reporting available Vulkan functionality for diverse target systems, now interrogates capabilities reported by the Vulkan Portability extension if present, enabling the community to upload precise configuration information for layered Vulkan functionality. Database entries containing data reported by the Vulkan Portability extension can be listed. Information about target devices can be exported from the gpuinfo.org database to generate JSON-based DevSim config files to accurately reflect the capabilities of that device into the Vulkan SDK DevSim layer. This enables developers to correctly and precisely use the reported functionality of a particular target device with a Vulkan Portability implementation on any development system. For example, a developer can use a Windows-based system to develop Vulkan code that will run correctly on a specific model of iPhone.

DevSim config files can also be hand coded, or generated with the vulkaninfo utility. A version of vulkaninfo for macOS is included in the macOS SDK. Vulkaninfo for iOS is available at KhronosGroup/Vulkan-Tools and can be built by users and run on an iOS device. The new SDK today ships with pre-generated DevSim config files for selected Mac, iPad and iPhone devices, and as more Apple hardware configurations are added to the gpuinfo.org database, these configurations will be added to the pre-populated configuration files in the SDK. The SDK Vulkan Configurator is used to manage a library of DevSim config files so that a developer can easily select a particular target device.

Developing Vulkan Applications for Apple Platforms on macOS

If you are a developer implementing Vulkan applications for Apple platforms, please try out the new SDK with DevSim and Validation layers and provide feedback at LunarXchange.

What’s Next for the Vulkan Portability Initiative

The Vulkan Working Group at Khronos is now working to upgrade the Vulkan Conformance Test Suite to recognize when tests are being run over a Vulkan Portability layer so that functionality tests reported as missing by the Vulkan Portability Extension will not cause failures, but that all functionality reported to be present is still fully tested to be conformant. Vulkan Portability implementations that pass this partial conformance process cannot be Vulkan conformant, but they will be enabled to use the Vulkan Portability trademark and logo to indicate that present functionality has been tested. This conformance work is well underway and, when complete, will enable the release of the finalized Vulkan Portability Extension and conformant Vulkan Portability implementations.

An updated Vulkan Portability presentation is available here. Developers are encouraged to provide feedback on any aspect of the Vulkan Portability Initiative, including filing issues and suggestions on the Vulkan Portability GitHub.

Comments